package com.sophimp.award.dsl

import com.angcyo.dsladapter.DslAdapterItem
import com.angcyo.dsladapter.DslViewHolder
import com.sophimp.award.R
import com.sophimp.award.bean.AwardItem

/**
 * create by sfx on 2022/8/10 14:43
 */
class DslHabitItem : DslAdapterItem() {
    init {
        itemLayoutId = R.layout.item_task_habit
    }

    override fun onItemBind(
        itemHolder: DslViewHolder,
        itemPosition: Int,
        adapterItem: DslAdapterItem,
        payloads: List<Any>
    ) {
        super.onItemBind(itemHolder, itemPosition, adapterItem, payloads)
        if (itemData != null) {
            val data = itemData as AwardItem
            itemHolder.tv(R.id.tvTaskName)?.text = data.name
        }
    }
}